package com.example.mapper;

import com.example.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ljw
 * @version 1.0
 * @Date 2024/9/12 17:58
 */
public interface UserMapper {

    User findUserById(Integer id);

    List<User> findAll();

    int updateById(User user);

    int deleteById(Integer id);

    User findUserByLogin(@Param("username") String username, @Param("password") String password);

    User findByName(String username);

    int insertUser(String username,String password);

    boolean saveOrUpdate(User user);

    void addUser(User user);

    void updateUser(User user);
}
